import threading
import time
from concurrent.futures import ThreadPoolExecutor, as_completed


# print(threading, dir(threading))


# def t1_main(*args):
#     for i in range(6):
#         print(f"线程1{args}")
#         time.sleep(1)

# t1 = threading.Thread(target=t1_main())
# t1.start()
# if __name__ == '__ti_main__':
#     t1_main()

# def t2_main(*args):
#     for i in range(6):
#         print(f"线程2{args}")
#         time.sleep(1)
#
#
# def main(*args):
#     print(f"主线程入口{args}")
#     t1 = threading.Thread(target=t1_main, args=('11', '111', '1111'))
#     t1.start()
#     # t1.join()
#
#     t2 = threading.Thread(target=t2_main,args=('22',))
#     t2.start()
#
#     for i in range(6):
#         time.sleep(1)
#         print("主线程")
#
#
#
#
# if __name__ == '__main__':
#     main(3)
#

def t_main():
    for i in range(5):
        print("a")
        time.sleep(1)


def main():
    with ThreadPoolExecutor(max_workers=10) as executor:
        [executor.submit(t_main) for i in range(10)]


if __name__ == '__main__':
    main()
